#include"Logger.hpp"
#include<memory>

int main()
{
    EnableConsoleLogSrategy();//宏替换

    //RAII风格的日志构建和输出刷新的过程
    LOG(Loglevel::ERROR) << "Hello World"<<"3.14"<<123;
    LOG(Loglevel::WARNING) << "Hello World"<<"3.14"<<123;
    LOG(Loglevel::ERROR) << "Hello World"<<"3.14"<<123;
    LOG(Loglevel::ERROR) << "Hello World"<<"3.14"<<123;
    // std::string test="hello world";
    // //测试策略1：显示器写入
    // std::unique_ptr<LogStrategy> logger_ptr=std::make_unique<FileLogStrategy>();//基类指针指向子类
    // logger_ptr->SyncLog(test);
    // logger_ptr->SyncLog(test);
    // logger_ptr->SyncLog(test);
    // logger_ptr->SyncLog(test);
    // logger_ptr->SyncLog(test);

    
    return 0;
}